package common

import (
	"crypto/md5"
	"encoding/hex"
)

// 计算MD5
func CalculateMD5(input string) string {
	// 定义一个随机盐值
	salt := "random_salt"
	hash := md5.New()
	hash.Write([]byte(input + salt))
	return hex.EncodeToString(hash.Sum(nil))
}
